import vendor.mnist.input_data as input_data

# 下载全部MNIST数据
mnist = input_data.read_data_sets("data_mnist/", one_hot=True)

# 下载单个MNIST数据(如果已下载则直接返回路径)
filepath = input_data.maybe_download(filename="t10k-images-idx3-ubyte.gz", work_directory="mnist_data2/")
print(filepath)

images = input_data.extract_images("data_mnist/train-images-idx3-ubyte.gz")
print(images)

labels = input_data.extract_labels("data_mnist/train-labels-idx1-ubyte.gz", one_hot=True)
print(labels)
